package com.lmx.repoDomain.repository;

import io.katharsis.queryParams.QueryParams;
import io.katharsis.repository.annotations.JsonApiFindAll;
import io.katharsis.repository.annotations.JsonApiResourceRepository;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.lmx.persistence.service.FoodService;
import com.lmx.repoDomain.tmodel.Food;

/**
 * 食物
 *
 * @author ytche
 * @date 2017年8月30日
 *
 */
@JsonApiResourceRepository(value = Food.class)
@Component
public class FoodRepository extends BaseRepository<Food> {
	@Autowired
	private FoodService service;

	@PostConstruct
	public void init() {
		super.dslJpaService.setEntityClass(Food.class);
	}

	@Override
	@JsonApiFindAll
	public Iterable<Food> findAll(final QueryParams requestParams) {
		return super.findAll();
	}
}
